from django.conf.urls import patterns, include, url

from django.conf.urls.defaults import *
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', 'controledesalas.views.index'),
    
    url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout',
        {'next_page' : '/'}),
    
    url(r'^public/', include('public.urls')),
    
    url(r'^private/', include('private.urls')),
    
    # Examples:
    # url(r'^$', 'controledesalas.views.home', name='home'),
    # url(r'^controledesalas/', include('controledesalas.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # URLs para admin
    url(r'^admin/', include(admin.site.urls)),
    
    url(r'^static/(.*)$', 'django.views.static.serve',
     {'document_root': settings.STATIC_ROOT}),
    
    url(r'^media/(.*)$', 'django.views.static.serve',
     {'document_root': settings.MEDIA_ROOT}),
)
